The present invention relates generally to graphics accelerators, and in particular to a graphics accelerator lighting evaluation unit.
Graphics accelerators are often used to determine display information for realistic scene displays by computer systems. In determining the display information, graphics accelerators process large amounts of data at extremely high speeds. As the determination of the characteristics of any display may be complex, the processing performed by the graphics accelerators is both complicated and computationally expensive.
An example of the complicated processing performed by graphics accelerators is that associated with the effects of lighting on an object. The effects of lighting on an object are, in a simple case, merely determining whether an object is illuminated and therefore visible, or is not illuminated and therefore invisible. Such simple cases, however, are rare.
In general, the appearance of an object is defined by light generated by or reflected from the object which reaches a viewer. Examples of light generated by objects is the light generated by a light bulb or the light generated by the sun. With respect to reflected light, the possibilities are more complex. For example, the light may come from a variety of sources, at different locations, and the light sources may generate different colors. In addition, reflected light is a function of the material from which the light is reflected, both in terms of color and reflectivity. Moreover, the relative position of both the light sources, the object from which the light is reflected, and the position of the viewer also cause the light received by the viewer to change.
Accordingly, a number of factors affect the effects of lighting on an object. These factors are combined in complex calculations in order to provide realistic displays. Many of these factors, particularly these that relate to the geometry, or relative position, of the viewpoint and the objects, change dynamically in real time.
General purpose arithmetic logic units (ALUs) are sometimes used by graphics accelerators to perform the complex calculations required to provide realistic lighting. ALUs include logic to perform complex calculations. Graphics accelerators, however, are continually pressed to provide ever increasing functions at ever increasing speeds. Moreover, graphics accelerators are often required to perform calculations on a vertex by vertex basis, for exceedingly large numbers of vertices. ALUs, not being specially designed for the exact use to which graphics accelerators may put them, often impose timing constraints which impact the ability of graphics accelerators to provide increasing realism and functionality.
The present invention provides a graphics processing system having a lighting evaluation unit. In one embodiment the lighting evaluation unit comprises a calculation unit including a dot product circuit, the dot product circuit calculating a dot product between two vector representations. In one embodiment the lighting calculation unit determines specular, diffuse, spot, and attenuation components of a lighting equation in parallel. In one embodiment the lighting calculation unit multiplexes data into dot product circuitry in a sequential pipelined manner to calculate lighting for a vertex. In one embodiment the lighting calculation unit comprises pipeline circuitry performing lighting equation evaluations on a vertex-by-vertex basis as well as on a light-by-light basis.
These and other aspects of the present invention are more readily understood when considered in conjunction with the accompanying drawings and following detailed description.